package com.ruoyi.project.erp.project.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.erp.project.mapper.ErpProjectMapper;
import com.ruoyi.project.erp.project.domain.ErpProject;
import com.ruoyi.project.erp.project.service.IErpProjectService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 项目Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-06
 */
@Service
public class ErpProjectServiceImpl implements IErpProjectService 
{
    @Autowired
    private ErpProjectMapper erpProjectMapper;

    /**
     * 查询项目
     * 
     * @param projectId 项目主键
     * @return 项目
     */
    @Override
    public ErpProject selectErpProjectByProjectId(Long projectId)
    {
        return erpProjectMapper.selectErpProjectByProjectId(projectId);
    }

    /**
     * 查询项目列表
     * 
     * @param erpProject 项目
     * @return 项目
     */
    @Override
    public List<ErpProject> selectErpProjectList(ErpProject erpProject)
    {
        return erpProjectMapper.selectErpProjectList(erpProject);
    }

    /**
     * 新增项目
     * 
     * @param erpProject 项目
     * @return 结果
     */
    @Override
    public int insertErpProject(ErpProject erpProject)
    {
        return erpProjectMapper.insertErpProject(erpProject);
    }

    /**
     * 修改项目
     * 
     * @param erpProject 项目
     * @return 结果
     */
    @Override
    public int updateErpProject(ErpProject erpProject)
    {
        return erpProjectMapper.updateErpProject(erpProject);
    }

    /**
     * 批量删除项目
     * 
     * @param projectIds 需要删除的项目主键
     * @return 结果
     */
    @Override
    public int deleteErpProjectByProjectIds(String projectIds)
    {
        return erpProjectMapper.deleteErpProjectByProjectIds(Convert.toStrArray(projectIds));
    }

    /**
     * 删除项目信息
     * 
     * @param projectId 项目主键
     * @return 结果
     */
    @Override
    public int deleteErpProjectByProjectId(Long projectId)
    {
        return erpProjectMapper.deleteErpProjectByProjectId(projectId);
    }
}
